<%--
  Created by IntelliJ IDEA.
  User: csnf
  Date: 2024/12/24
  Time: 8:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>投票系统登录页面</title>
    <style>
        body {
            background-color: rgb(128, 255, 255);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            font-family: Arial, sans-serif;
        }
        .box {
            width: 500px;
            height: 400px;
            background-color: white;
            border-radius: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            padding: 20px;
        }
        .box1 {
            margin-top: 20px;
            text-align: center;
        }
        .box1 input {
            width: 300px;
            height: 40px;
            border: 2px solid gray;
            border-radius: 10px;
            padding: 5px 10px;
            font-size: 16px;
        }
        .box1 input:focus {
            outline: none;
            border-color: #4CAF50;
        }
        p {
            text-align: center;
            margin-top: 30px;
            font-size: 24px;
            font-weight: bolder;
            color: #333;
        }
        .box1 select {
            width: 300px;
            height: 40px;
            border: 2px solid gray;
            border-radius: 10px;
            padding: 5px 10px;
            font-size: 16px;
        }
        .box1 select:focus {
            outline: none;
            border-color: #4CAF50;
        }
        .box1 input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            cursor: pointer;
            border: none;
            transition: background-color 0.3s ease;
        }
        .box1 input[type="submit"]:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<script>
    var msg = "${msg}";
    if (msg === "1") {
        alert("登录失败");
    } else {
        alert("没有该用户");
    }
</script>
<form action="user" method="post">
    <div class="box">
        <p>投票系统</p>
        <div class="box1">
            <input type="text" name="uName" placeholder="请输入用户名" />
        </div>
        <div class="box1">
            <input type="text" name="passWord" placeholder="请输入密码" />
        </div>
        <div class="box1">
            <select name="roleId">
                <c:forEach items="${roleList}" var="role">
                    <option value="${role.roleId}">${role.roleName}</option>
                </c:forEach>
            </select>
        </div>
        <div class="box1">
            <input type="submit" value="登录" />
        </div>
    </div>
</form>
</body>
</html>